//
// Created by 吴锐 on 2022/2/27.
//

#include "iostream"

using namespace std;

void swapInt(int& a, int& b){
    int temp = a;
    a = b;
    b = temp;
}

void swapDouble(int& a, int& b){
    double temp = a;
    a = b;
    b = temp;
}

template<typename T>
void mySwap(T& a, T& b){
    T temp = a;
    a = b;
    b = temp;
}

void test01(){
    int a = 10;
    int b = 20;
//    swapInt(a, b);

    mySwap<int>(a, b);
    cout << a << endl;
    cout << b << endl;
}

int main(){
    test01();
    return 0;
}